<template>
  <div class="k-g2ftbq">

    <LuckyDraw @start="start" @animationOver="animationOver" :id="prizeId" />

  </div>
</template>

<script lang="ts" setup>
import LuckyDraw from '@/components/luckydraw.vue'
import NoticeBar from '@/components/noticeBar.vue'
import { Button } from 'vant'
import { ref } from 'vue'
const prizeId = ref<number | string>('') //奖品id,后端获取
const start = async () => {
  prizeId.value = ''
  //请求获取中奖id
  setTimeout(() => {
    prizeId.value = 2
  })

}

//动画结束 处理对应弹窗
const animationOver = (id: number) => {
  alert(`中奖id:${id}`)
}
</script>
<style lang="less">
.k-g2ftbq {
  font-size: 16px;
  background: #2d8fff;
  min-height: 100vh;

  box-sizing: border-box;

  background-size: 100% auto;


}
</style>
